From: Georges Basile Stavracas Neto Date: Fri, 27 Mar 2020 23:35:36 +0000 (-0300) Subject: unlockDialog: Only cancel AuthPrompt if it exists X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~751^2^2~24 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bea34da289a39e88ca1a6bf0af69a0865e3ff7f8;p=gnome-shell.git unlockDialog: Only cancel AuthPrompt if it exists AuthPrompt is created on demand, and this._authPrompt is expected to be null except on very strictly controlled occasions. The idle monitor callback isn't one of them. Check if AuthPrompt exists before cancelling it. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2371 --- diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index d27b1d59c..2170f12a7 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -761,7 +761,7 @@ var UnlockDialog = GObject.registerClass({ } _escape() { - if (this.allowCancel) + if (this._authPrompt && this.allowCancel) this._authPrompt.cancel(); }